﻿/*
 * 由SharpDevelop创建。
 * 用户： xuhh01
 * 日期: 2015/11/19
 * 时间: 13:53
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;
using System.Collections.Generic;

namespace Listener
{
	/// <summary>
	/// Description of CurPlayInformation.
	/// </summary>
	class CurPlayInformation : PropertyChangedBase
    {
    	readonly int MaxVolume = 100;
        readonly int MinVolume = 0;
        
    	public CurPlayInformation()
    	{
    		PassTime = "00:00";
    		TotalTime = "00:00";
    		
    		TotalSeconds = 100;
    		PassSeconds= 0;
    		
    		UserPlayMode = PlayMode.PlayMode_Order;
    		
    		_CompleteListOfRandom = new HashSet<string>();
    	}
        
        private int _CurVolume;
        public int CurVolume
        {
            get { return _CurVolume; }
            set
            {
                if (MinVolume <= value && value <= MaxVolume)
                    _CurVolume = value;
                else if (value < MinVolume)
                    _CurVolume = MinVolume;
                else if (value > MaxVolume)
                    _CurVolume = MaxVolume;
                InvokePropertyChanged("CurVolume");
            }
        }

        private int _TotalSeconds;
        public int TotalSeconds
        {
            get { return _TotalSeconds; }
            set { _TotalSeconds = value; InvokePropertyChanged("TotalSeconds"); }
        }
        
        private int _PassSeconds;
        public int PassSeconds
        {
        	get { return _PassSeconds;}
        	set { _PassSeconds = value; InvokePropertyChanged("PassSeconds"); }
        }

        private string _TotalTime;
        public string TotalTime
        {
            get { return _TotalTime; }
            set { _TotalTime = value; InvokePropertyChanged("TotalTime"); }
        }

        private string _PassTime;
        public string PassTime
        {
            get { return _PassTime; }
            set { _PassTime = value; InvokePropertyChanged("PassTime"); }
        }
        
        private PlayMode _UserPlayMode;
        public PlayMode UserPlayMode
        {
        	get { return _UserPlayMode; }
        	set { _UserPlayMode = value; InvokePropertyChanged("UserPlayMode");}
        }
        
        private string _CurPlayMusic;
        public string CurPlayMusic
        {
        	get { return _CurPlayMusic; }
        	set { _CurPlayMusic = value; InvokePropertyChanged("CurPlayMusic");}
        }
        
        private HashSet<string> _CompleteListOfRandom;
        public HashSet<string> CompleteListOfRandom
        {
        	get { return _CompleteListOfRandom; }
        }
    }
}
